﻿Imports System.Security.Principal

Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports ContactFormBLL



'''<summary>
'''This is a test class for BaseRepositoryTest and is intended
'''to contain all BaseRepositoryTest Unit Tests
'''</summary>
<TestClass()> _
Public Class BaseRepositoryTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    'You can use the following additional attributes as you write your tests:
    '
    'Use ClassInitialize to run code before running the first test in the class
    '<ClassInitialize()>  _
    'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    'End Sub
    '
    'Use ClassCleanup to run code after all tests in a class have run
    '<ClassCleanup()>  _
    'Public Shared Sub MyClassCleanup()
    'End Sub
    '
    'Use TestInitialize to run code before running each test
    '<TestInitialize()>  _
    'Public Sub MyTestInitialize()
    'End Sub
    '
    'Use TestCleanup to run code after each test has run
    '<TestCleanup()>  _
    'Public Sub MyTestCleanup()
    'End Sub
    '
#End Region


    '''<summary>
    '''A test for EnableCaching
    '''</summary>
    <TestMethod(), _
     DeploymentItem("ContactFormBLL.dll")> _
    Public Sub EnableCachingTest()
        Dim param0 As PrivateObject = Nothing ' TODO: Initialize to an appropriate value
        Dim target As BaseRepository_Accessor = New BaseRepository_Accessor(param0) ' TODO: Initialize to an appropriate value
        target.EnableCaching = True
        Assert.IsTrue(target.EnableCaching)
    End Sub

    '''<summary>
    '''A test for DefPageSize
    '''</summary>
    <TestMethod()> _
    Public Sub DefPageSizeTest()
        Dim target As BaseRepository = CreateBaseRepository() ' TODO: Initialize to an appropriate value
        Dim expected As Integer = 0 ' TODO: Initialize to an appropriate value
        Dim actual As Integer
        target.DefPageSize = expected
        actual = target.DefPageSize
        Assert.AreEqual(expected, actual)
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    '''<summary>
    '''A test for CurrentUserName
    '''</summary>
    <TestMethod(), _
     DeploymentItem("ContactFormBLL.dll")> _
    Public Sub CurrentUserNameTest()
        Dim actual As String
        actual = BaseRepository_Accessor.CurrentUserName
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    '''<summary>
    '''A test for CurrentUserIP
    '''</summary>
    <TestMethod(), _
     DeploymentItem("ContactFormBLL.dll")> _
    Public Sub CurrentUserIPTest()
        Dim actual As String
        actual = BaseRepository_Accessor.CurrentUserIP
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    '''<summary>
    '''A test for CurrentUser
    '''</summary>
    <TestMethod(), _
     DeploymentItem("ContactFormBLL.dll")> _
    Public Sub CurrentUserTest()
        Dim actual As IPrincipal
        actual = BaseRepository_Accessor.CurrentUser
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    '''<summary>
    '''A test for ConnectionString
    '''</summary>
    <TestMethod()> _
    Public Sub ConnectionStringTest()
        Dim target As BaseRepository = CreateBaseRepository() ' TODO: Initialize to an appropriate value
        Dim expected As String = String.Empty ' TODO: Initialize to an appropriate value
        Dim actual As String
        target.ConnectionString = expected
        actual = target.ConnectionString
        Assert.AreEqual(expected, actual)
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    Friend Overridable Function CreateBaseRepository_Accessor() As BaseRepository_Accessor
        'TODO: Instantiate an appropriate concrete class.
        Dim target As BaseRepository_Accessor = Nothing
        Return target
    End Function

    '''<summary>
    '''A test for CacheDuration
    '''</summary>
    <TestMethod(), _
     DeploymentItem("ContactFormBLL.dll")> _
    Public Sub CacheDurationTest()
        Dim param0 As PrivateObject = Nothing ' TODO: Initialize to an appropriate value
        Dim target As BaseRepository_Accessor = New BaseRepository_Accessor(param0) ' TODO: Initialize to an appropriate value
        Dim expected As Integer = 0 ' TODO: Initialize to an appropriate value
        Dim actual As Integer
        target.CacheDuration = expected
        actual = target.CacheDuration
        Assert.AreEqual(expected, actual)
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub

    Friend Overridable Function CreateBaseRepository() As BaseRepository
        'TODO: Instantiate an appropriate concrete class.
        Dim target As BaseRepository = Nothing
        Return target
    End Function

    '''<summary>
    '''A test for CacheKey
    '''</summary>
    <TestMethod()> _
    Public Sub CacheKeyTest()
        Dim target As BaseRepository = CreateBaseRepository() ' TODO: Initialize to an appropriate value
        Dim expected As String = String.Empty ' TODO: Initialize to an appropriate value
        Dim actual As String
        target.CacheKey = expected
        actual = target.CacheKey
        Assert.AreEqual(expected, actual)
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub
End Class
